<Query Kind="Program" />

void Main()
{
	Component component = new ConcreteComponent();
	Decorator decorator = new ConcreteDecorator(component);
	decorator.Operation();
}

abstract class Component {
	public abstract void Operation();
}

class ConcreteComponent : Component{
	public override void Operation(){
		Console.WriteLine("Operation");
	}
}

class Decorator : Component{
	private Component component;
	public Decorator(Component component){
		this.component = component;
	}
	public override void Operation(){
		component.Operation();
	}
}

class ConcreteDecorator : Decorator{
	public ConcreteDecorator(Component component) : base(component){
		
	}
	public override void Operation(){
		base.Operation();
		AddedBehavior();
	}
	public void AddedBehavior(){
		Console.WriteLine("AddedBehavior");
	}
}

